from django.urls import path, include
from rest_framework.routers import SimpleRouter, DefaultRouter
from . import views
# 创建一个管理对象
# trailing_slash 是否要在 生成的路由尾部 添加 '/'
# router = SimpleRouter(trailing_slash=False)


# 注册视图集
router = DefaultRouter()
router.register(r'', views.GroupViewSet, basename='group')

urlpatterns = [
    # 包含视图集路由
    path('', include(router.urls)),
]